
const $ = ele => document.querySelector(ele)

const ajax = (path , cb) => {
    const xhr = new XMLHttpRequest() ;
    xhr.open('get' , path , true) ;
    xhr.send() ;
    xhr.onreadystatechange = function () {  
        if(xhr.readyState === 4 && xhr.status === 200) {
            const data = xhr.responseText ;
            cb(data) ;
        }
    }
}